package com.hitqz.robot.arm.constant;

import java.util.HashMap;
import java.util.Map;

public enum RealManSysErrorEnum {

    NORMAL(0x0000, "系统正常"),

    ERROR1(0x1001, "关节通信异常"),

    ERROR2(0x1002, "目标角度超过限位"),

    ERROR3(0x1003, "该处不可达，为奇异点"),

    ERROR4(0x1004, "实时内核通信错误"),

    ERROR5(0x1005, " 关节通信总线错误"),

    ERROR6(0x1006, "规划层内核错误"),

    ERROR7(0x1007, "关节超速"),

    ERROR8(0x1008, "末端接口板无法连接"),

    ERROR9(0x1009, "保留，未定义"),

    ERROR10(0x100A, "保留，未定义"),

    ERROR11(0x100B, "关节抱闸未打开"),

    ERROR12(0x100C, "拖动示教时超速"),

    ERROR13(0x100D, "机械臂发生碰撞"),

    ERROR14(0x100E, "无该工作坐标系"),

    ERROR15(0x100F, "无该工具坐标系"),

    ERROR16(0x1010, "关节发生掉使能错误"),

            ;

    public static Map<Integer, String> SYSTEM_ERROR =new HashMap<>(16);


    static {
        for (RealManSysErrorEnum value: values()) {
            RealManSysErrorEnum.SYSTEM_ERROR.put(value.key, value.name);
        }
    }

    private Integer key;

    private String name;

    RealManSysErrorEnum(Integer key, String name) {
        this.key = key;
        this.name = name;
    }

    public Integer getKey() {
        return key;
    }

    public String getName() {
        return name;
    }


}
